using System.Data.Entity.ModelConfiguration;

namespace CrawlerFramework.Models.Mapping
{
    public class CrawlStatusDefinitionMap : EntityTypeConfiguration<CrawlStatusDefinition>
    {
        public CrawlStatusDefinitionMap()
        {
            // Primary Key
            HasKey(t => t.CrawlStatusDefinitionId);

            // Properties
            Property(t => t.CrawlStatusDescription)
                .IsRequired();

            // Table & Column Mappings
            ToTable("CrawlStatusDefinition");
            Property(t => t.CrawlStatusDefinitionId).HasColumnName("CrawlStatusDefinitionId");
            Property(t => t.CrawlStatusValue).HasColumnName("CrawlStatusValue");
            Property(t => t.CrawlStatusDescription).HasColumnName("CrawlStatusDescription");
        }
    }
}
